import React from 'react'
import { Table } from 'antd';
const AntTable = (props) => {
  const columns = [
    {
    title: '充值单号',
    dataIndex: 'rechargeNumber',
    // render(text) {
    //   return <a href="#">{text}</a>;
    // }
    },
    {
    title: '用户手机',
    dataIndex: 'phone'
    },
    {
    title: '真实姓名',
    dataIndex: 'name'
    },
    {
      title: '用户来源',
      dataIndex: 'source'
    },
    {
      title: '应用来源',
      dataIndex: 'apply'
    },
    {
      title: '充值金额',
      dataIndex: 'rechargeAmount'
    },
    {
      title: '到账金额',
      dataIndex: 'rechargeAmount'
    },
    {
      title: '手续费',
      dataIndex: 'serviceCharge'
    },
    {
      title: '充值方式',
      dataIndex: 'mode'
    },
    {
      title: '交易流水号',
      dataIndex: 'deal'
    },
    {
      title: '订单时间',
      dataIndex: 'orderDate'
    },
    {
      title: '到账时间',
      dataIndex: 'accountDate'
    },
    {
      title: '状态',
      dataIndex: 'status'
    },];
  console.log(props.data)
  const data = [...props.data];
  // for (let i = 0; i < 46; i++) {
  //   data.push({
  //     key: i,
  //     name: `李大嘴${i}`,
  //     age: 32,
  //     address: `西湖区湖底公园${i}号`
  //   });
  // }

  const pagination = {
    total: data.length,
    showSizeChanger: true,
    onShowSizeChange(current, pageSize) {
      console.log('Current: ', current, '; PageSize: ', pageSize);
    },
    onChange(current) {
      console.log('Current: ', current);
    }
  };
  return (
    <>
      <Table columns={columns} dataSource={data} pagination={pagination} />
    </>
  )
}

export default AntTable